package tedu.shoot;
import java.awt.image.BufferedImage;

public class Airplane extends FlyingObject implements EnemyScore{
    private int speed;
    public Airplane(){
        super(48,50);
        speed = 2;
    }
    public void step(){ y += speed; }

    public int getScore(){
        return 1;
    }

    int index = 1;
    public BufferedImage getImage() {
        if (isLive()){
            return Images.airs[0];
        }else if(isDead()){
            BufferedImage img = Images.airs[index++];
            if (index == Images.airs.length){
                state = REMOVE;
            }
            return img;
        }
        return null;
    }
}
